package com.cungmua.app.model.request;

import com.cungmua.app.utils.AppUtils;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Created by kelvin.nguyen on 6/25/14.
 */
public class CancelOrderRequest extends AuthenticatedRequest {
    private int userId;
    private int orderId;
    private int cityId;

    public CancelOrderRequest(String deviceId, String token) {
        super(deviceId, token);
    }

    @JsonProperty("UserId")
    public int getUserId() {
        return userId;
    }

    @JsonProperty("OrderId")
    public int getOrderId() { return orderId; }

    @JsonProperty("CityId")
    public int getCityId() {
        return cityId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public void setOrderId(int orderId) { this.orderId = orderId; }

    public void setCityId(int cityId) {
        this.cityId = cityId;
    }

    @Override
    public String getSign() {
        return AppUtils.MD5(String.valueOf(getUserId()) + getOrderId() + getCityId() +
                getVersion() + getDeviceId() + getToken());
    }
}

